home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-05-13 | 3.9 KB | 85 lines | [TEXT/MPS ] |
- Author
- ------
- Craig Hotchkiss
-
- The Communications Toolbox API
- ==============================
- Okay, first the standard paragraph:
-
- Traditional communications applications provide access to terminal emulations, file
- transfer services, and connection services. The CommToolbox Application Programming
- Interface provides consistency for accessing these services, both from the application
- and tool points of view.
-
- What this really means:
-
- If you follow this interface closely your tool or application will work in a wide
- variety of environments. This allows for great sales opportunities.
-
- What it DOESN'T mean:
-
- Tools/applications providing similar services need to operate and perform
- similarly (NOT!).
-
-
- It is true that by following this interface tool or application response is similar
- but the methods used to get the job done can be radically different. For example,
- imagine a modem tool with address book capabilities for frequently called numbers or
- a tool that provides a language popup menu to switch dialog item text between languages.
-
-
-
- Application conformance tips
- ----------------------------
- You can save yourself some debugging time by using the user interface to protect the
- user and your application from causing difficulties. For example, disable any 'Open
- Connection' menu item after CMOpen so that the user cannot select it again. Then use
- CMStatus to determine if the menu item can be reenabled.
-
- If you have any doubt about appropriate behavior you may not have all the information
- you need. It is sometimes helpful to also understand how the tool is supposed to
- behave so don't stop reading after the manager chapters of Inside Mac CTB, also look
- for the corresponding message that gets sent to the tool and read the tool chapters.
-
- If you are still unclear, use the CommToolbox Talk folder on AppleLink to discuss
- the problem. Everybody has opinions and even though an Apple engineer may not
- be available to respond, they will probably read it and thus be aware of the unclear
- nature of the API or documentation. CommToolbox was/is a big project and there
- will probably always be some shake-out in progress because of the wide variety of
- opinions and the evolving nature of the beast.
-
-
- Tool conformance tips
- ---------------------
- Do not perform any internal magic in response to messages. For instance, don't
- automatically CMAbort a CMOpen just because the application sends another CMOpen
- immediately after the first one. Instead treat the second CMOpen appropriately
- by either ignoring it or stacking it depending on the capabilities of your tool.
- You can take other actions within a message however, like receiving a cmWriteMsg
- and compressing the data before sending it -- just make sure you respond like
- the descriptions in the IM CommToolbox document.
-
- Make it work with MacTerminal v3.0 or something like it. This should help prove
- conformance to the API.
-
- Add the new caps, faps, or taps resource describing the capabilities of your tool.
-
- Use internal status for asynchronous operations that could be stacked and return
- an error code as the maximum for your queue is reached.
-
-
-
- -------------------------------------------------------------------------------------
- DISCLAIMER - This paper contains hints to assist CommToolbox software developers with
- their efforts at producing awesome products. They are just hints (a form of help)
- however, and are not intended to represent the only possible solution.
-
- It should also be noted that this paper describes current CommToolbox interface
- usage and while the CTB interface could change, upwards-compatibility will remain a
- focus of the CTB production team wherever possible. Therefore the hints contained
- in this document that use the changing CTB interface represent a solution that should
- remain viable.
- -------------------------------------
- Copyright © 1992 Apple Computer, Inc.
- All rights reserved.
-